//
//  ACLiveTypeSelectedCell.m
//  ACLiteAVUISDK
//
//  Created by 冯琰琰 on 2021/3/29.
//

#import "ACLiveTypeSelectedCell.h"

@interface ACLiveTypeSelectedCell ()
@property (weak, nonatomic) IBOutlet UILabel *liveTypeLabel;

@property (weak, nonatomic) IBOutlet UIImageView *liveSelectedIcon;

@property (weak, nonatomic) IBOutlet UIView *bgView;

@end


@implementation ACLiveTypeSelectedCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.bgView.layer.masksToBounds = YES;
    self.bgView.layer.cornerRadius = 24;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

-(void)setDataDic:(NSDictionary *)dataDic{
    _dataDic = dataDic;
    if ([_dataDic.allKeys containsObject:@"title"]) {
        self.liveTypeLabel.text = _dataDic[@"title"];
    }else{
        self.liveTypeLabel.text = @"";
    }
    
    if ([_dataDic.allKeys containsObject:@"isSelected"]) {
        NSString *value = _dataDic[@"isSelected"];
        if ([value intValue] == 1) {
            [self.liveSelectedIcon setHidden:NO];
        }else{
            [self.liveSelectedIcon setHidden:YES];
        }
    }
}
@end
